<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.ctctc.business.BusinessConfiguration"%>
<%@ page import="hibernate.VGlUserinfo"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="commontaglib"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
	VGlUserinfo user = (VGlUserinfo) session.getAttribute(BusinessConfiguration.SESSION_USERNAME);
	String name = user.getUserid();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<link rel="stylesheet" href="<%=path%>/css/innerstyle.css"
	type="text/css" />
<link rel="stylesheet" type="text/css" media="screen"
	href="<%=path%>/css/cupertino/jquery-ui.custom.min.css" />
<script type='text/javascript' src='/glqt/dwr/util.js'></script>
<script type='text/javascript' src='/glqt/dwr/engine.js'></script>
<script type='text/javascript' src='/glqt/dwr/interface/htdwr.js'></script>
<script type='text/javascript' src='/glqt/dwr/interface/jydz.js'></script>
<script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/js/jquery-ui.custom.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.form.js"></script>
<script type="text/javascript" src="<%=path%>/js/json2.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/messages_zh.js"></script>

<style type="text/css">
#tab {
	width: 99%;
	border: #F4F4F4 solid 4px;
	padding: 0 2px 3px 2px;
	margin: 0;
	float: left;
}

#tab h1 {
	display: block;
	width: 95%;
	height: 45px;
	float: center;
	text-align: center;
	padding-top: 5px;
}

#tab h1 span {
	width: 250px;
	font: bold 26px/55px Arial, Helvetica, sans-serif;
	color: #fff;
	background-color: #fff;
	display: block;
}

.textbox {
	width: 90px;
	border: #000 1px solid;
}

.textboxs {
	width: 70px;
	border: #000 1px solid;
}

.textboxs1 {
	width: 70px;
	border: #000 1px solid;
	background-color: #ddd;
}

.longtextbox {
	width: 180px;
	border: #000 1px solid;
}

.longtextbox1 {
	width: 180px;
	border: #000 1px solid;
	background-color: #ddd;
}

.shorttextbox {
	width: 50px;
	border: #000 1px solid;
}

.shorttextbox1 {
	width: 50px;
	border: #000 1px solid;
	background-color: #ddd;
}

.textarea {
	overflow: auto;
	border: #000 1px solid;
}

.textarea1 {
	overflow: auto;
	border: #000 1px solid;
	background-color: #ddd;
}

.select div {
	border: 1px solid #000;
	float: left;
}

label {
	display: block;
}

fieldset {
	padding: 0;
	border: 0;
	margin-top: 25px;
}

label.error {
	color: red; /*错误信息的颜色*/
}

input.error {
	border: 1px dotted red; /*输入错误的输入框的边框样式*/
}
</style>
<script type='text/javascript'>  


function changeTabForMsr(val){ 
      var url = "";     
      var dwbm = ${ydxx.maisrdwbm};
      //alert(val+" "+dwbm);     
      if(dwbm==val){
      url = "<%=path%>/htgl/findJydwList.action?dwbm="+val;
      $.post(url,function(data){
            var json = eval('(' + data + ')');
            $("#maisr").val(json[0].qiyqc);
            $("#zs").val(json[0].tongxdz);
            $("#fddbr").val(json[0].faddbr);
            $("#wtdlr").val(json[0].lianxr);
            $("#dh").val(json[0].lianxrdh);
            $("#cz").val(json[0].qiycz);
            $("#yb").val(json[0].qiyyb);
            $("#khyh").val(json[0].jiesfzh);
            $("#zh").val(json[0].jiesyhzh);
            $("#djh").val(json[0].shuiwdjzhgs);
            $("#msrlx").val('3');
            });      
      }else{
      url = "<%=path%>/htgl/findZgdwList.action?dwbm="+val;
      $.post(url,function(data){
            var json = eval('(' + data + ')');
            $("#maisr").val(json[0].danwmc);
            $("#zs").val(json[0].zhus);
            $("#fddbr").val(json[0].faddbr);
            $("#wtdlr").val(json[0].weitdlr);
            $("#dh").val(json[0].dianh);
            $("#cz").val(json[0].chuanz);
            $("#yb").val(json[0].youzbm);
            $("#khyh").val(json[0].kaihyh);
            $("#zh").val(json[0].yinhzh);
            $("#djh").val(json[0].nasrdjh);
            $("#msrlx").val('4');
            });
      }
      
   }
    

function loadMsrJsdwData(){
            var dwbm = ${ydxx.maisrdwbm};
             var url = "<%=path%>/htgl/findMsrJsList.action?msrId="+dwbm;
               $.post(url,function(data){
                var json = eval('(' + data + ')');
                $("#maisdwjsrbm").empty(); 
                $("#maisdwjsrbm").append("<option value='-1'>请选择</option>");      
                  for(var i=0;i<json.length;i++){                
                  $("#maisdwjsrbm").append("<option value='"+json[i].jiesdwbm+"'>"+json[i].jiesdwmc+"</option>");
                  }
                  
                 
                  $("#maisdwjsrbm").val(${ydxx.jsdw});
                  
               });
    } 

function loadShdwData(){
    var dwbm = ${ydxx.maisrdwbm};
    var url = "<%=path%>/htgl/findShdwList.action?msrId="+dwbm;    
      $.post(url,function(data){ 
        var projects = eval('(' + data + ')'); 
        //alert(projects);
       $( "#shr").autocomplete({
			minLength:2,
			source:projects,			
            select: function( event, ui ) {
            //alert(ui.item.label);	
				$( "#shr" ).val( ui.item.label );							
				$( "#shrid").val( ui.item.shouhdwbm );						
				return false;

			}
		});
    });
    }
   
   
   
    function loadTabForHtxs(){       
    var url = "";
    var projects = "";
    var vvalue=${bdxx.hetxs};
    //alert(vvalue);
    if(vvalue =='1'){
      loadTabForShsxx("100000","sheng");       
    }else{
      loadTabForShsxx("140000","sheng");        
    }
    loadForYinyzOrChusz(vvalue);
   }
    
    
    function loadForYinyzOrChusz(vvalue){
    var url = "";
    var projects = "";
    if(vvalue =='1'){
    url = "<%=path%>/jydz/findReChusz.action";
    }else{
    url = "<%=path%>/jydz/findReYingyz.action";
    }
    $.post(url,function(data){ 
        projects = eval('(' + data + ')');
        $("#yingyz").empty(); 
        $("#yingyz").append("<option value='-1'>请选择</option>");      
        for(var i=0;i<projects.length;i++){
        //alert(projects[i].name);
        $("#yingyz").append("<option value='"+projects[i].id+"'>"+projects[i].name+"</option>");
        }
        $("#yingyz").val('${ydxx.yingyzmeijglz}');
        });
    }
   
    
    function changeTabForJsdw(vvalue,dwlx){
        //alert(vvalue);
        htdwr.findJsdwDwr(vvalue,function(data) {
        if(dwlx=='1'){
              $("#szs").val(data.jiesdwzs);
              $("#sfddbr").val(data.faddbr);
              $("#swtdlr").val(data.weitdlr);
              $("#sdh").val(data.dianh);
              $("#scz").val(data.chuanz);
              $("#syb").val(data.youzbm);
              $("#skhyh").val(data.kaihyh);
              $("#szh").val(data.yinhzh);
              $("#sdjh").val(data.nasrdjh);
              $("#cmdwjsrmc").val( $("#chumdwjsrbm").find("option:selected").text()); 
           }else{
              $("#bzs").val(data.jiesdwzs);
              $("#bfddbr").val(data.faddbr);
              $("#bwtdlr").val(data.weitdlr);
              $("#bdh").val(data.dianh);
              $("#bcz").val(data.chuanz);
              $("#byb").val(data.youzbm);
              $("#bkhyh").val(data.kaihyh);
              $("#bzh").val(data.yinhzh);
              $("#bdjh").val(data.nasrdjh);
              $("#msdwjsrmc").val( $("#maisdwjsrbm").find("option:selected").text()); 
           }
        
        });       
    }
    
    function changeTabForShsxx(vvalue,tabid){  
        htdwr.findShengSDwr(vvalue,function(data) {
        //alert("#"+tabid);
        $("#"+tabid).empty(); 
        $("#"+tabid).append("<option value='-1'>请选择</option>");       
        for(var i=0;i<data.length;i++){
        sObj = data[i];
        $("#"+tabid).append("<option value='"+sObj.regioncode+"'>"+sObj.regionname+"</option>");
        }
               var ddssd=${ydxx.daodssd};
		if	(ddssd!='')
		{
		
		$("#"+tabid).val(ddssd);
		}  
        });        
    }
    
    function loadMsrData(dwbm){
        var url = "<%=path%>/htgl/findSjdwList.action";       
        $.post(url,function(data){
            var json = eval('(' + data + ')');           
        $("#msrbm").empty();        
        $("#msrbm").append("<option value='${ydxx.maisrdwbm}'>${ydxx.maishrdwmc}</option>");      
        for(var i=0;i<json.length;i++){
        //alert(projects[i].name);
        $("#msrbm").append("<option value='"+json[i].danwbm+"'>"+json[i].danwmc+"</option>");
        }
        $("#msrbm").val(dwbm);  
        });
   }
   
    
    
    
       
    function loadFhdwData(){
       var url = "<%=path%>/htgl/findFhdwList.action";    
      $.post(url,function(data){ 
        var projects = eval('(' + data + ')'); 
        //alert(projects);
       $( "#fahdwmc").autocomplete({
			minLength:2,
			source:projects,			
            select: function( event, ui ) {
            //alert(ui.item.label);	
				$( "#fahdwmc").val( ui.item.label );							
				$( "#fahdwbm").val( ui.item.fahdwbm );						
				return false;

			}
		});
    });
    }
    
   function loadTabForShengshi(vvalue){
        
        htdwr.findShengFDwr(vvalue,function(data){   
		
		$("#sheng").val(data[1].regioncode);
		changeTabForShsxx(data[1].regioncode,'shi')
		
        });
              
    }
    function loadTabForShsxx(vvalue,tabid){  
        htdwr.findShengSDwr(vvalue,function(data) {
        for(var i=0;i<data.length;i++){
        sObj = data[i];
        $("#"+tabid).append("<option value='"+sObj.regioncode+"'>"+sObj.regionname+"</option>");
        }  
		var ddssd=${ydxx.daodssd};
		if	(ddssd!='')
		{
		    loadTabForShengshi(ddssd)
		}
        });        
    }
    $(function(){ 
    var dwbm =${ydxx.maisrdwbm}; 
        loadMsrData(dwbm);  
        loadTabForHtxs();    
        loadMsrJsdwData();
        loadShdwData();              
        $("#but1").button();
        $("#but2").button();
        $("#but3").button();
        $("#jsdnr").button();
        $("#jsdnr1").button();
        $("#jsdnr1").hide();      
	    checkJg();
		tj();   
		jsdxxShow();  
		$("#jsdnr1").click(function(){
		jsdxxHide();		
		});
		$("#jsdnr").click(function(){
		jsdxxShow();		
		}); 
		$( document ).tooltip();
		if(${ydxx.yingdzt}==2||${ydxx.yingdr}!=<%=name%>)
		{
		 $("#but1").hide();
		}
    });
    
    
	
	function tj(){	
	/**  
     * 自定义验证规则——增加对select的验证  
     */  
    $.validator.addMethod(    
        "selectNone", 
        function(value, element)
        {   
            if (value == "-1") 
            {    
                return false;    
            }    
            else    
            {   
                return true;    
            }   
        },    
        "必须选择一项" 
    );   
	
	$("#form1").validate({
	       rules: {
	       sheng:{
	       selectNone:true
	       },	       
	       "yd.yingdsl":{
	       required: true, 
	       digits:true,
	       range:[0,9999999]
	       },
	        "yd.jsdw":{
	       selectNone:true
	       },		   
		   "yd.gml1":{
	       digits:true,
	       range:[0,${bdxx.yl1}]
	       },		   
		   "yd.gml2":{
	       digits:true,
	       range:[0,${bdxx.yl2}]
	       },		   
		   "yd.gml3":{
	       digits:true,
	       range:[0,${bdxx.yl3}]
	       },		   
		   "yd.gml4":{
	       digits:true,
	       range:[0,${bdxx.yl4}]
	       },		   
		   "yd.gml5":{
	       digits:true,
	       range:[0,${bdxx.yl5}]
	       },		   
		   "yd.gml6":{
	       digits:true,
	       range:[0,${bdxx.yl6}]
	       },		   
		   "yd.gml7":{
	       digits:true,
	       range:[0,${bdxx.yl7}]
	       },		   
		   "yd.gml8":{
	       digits:true,
	       range:[0,${bdxx.yl8}]
	       },		   
		   "yd.gml9":{
	       digits:true,
	       range:[0,${bdxx.yl9}]
	       },		   
		   "yd.gml10":{
	       digits:true,
	       range:[0,${bdxx.yl10}]
	       },		   
		   "yd.gml11":{
	       digits:true,
	       range:[0,${bdxx.yl11}]
	       },		   
		   "yd.gml12":{
	       digits:true,
	       range:[0,${bdxx.yl12}]
	       }
	       },
		   messages: {
		   sheng:"请选择省份",
	       "yd.jsdw":"请选择买受人结算单位",
		   "yd.yingdsl":{
	       required: "请输入数量", 
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入一千万吨之内的数")
	       },
		   "yd.gml1":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml2":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml3":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml4":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml5":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml6":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml7":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml8":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml9":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml10":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml11":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       },
		   "yd.gml12":{	       
	       digits:"请输入整数",
	       range:jQuery.validator.format("请输入报单量之内的数")
	       }
		   }
		   });
		   $("#but1").click(function(){
		    if($("#form1").valid()){ 
		       var flag = true;
		       var msg = "";
		       if(document.getElementById("shrid").value==""){
		           msg ="请选择收货单位";
		           flag = false;
		        }
		         if(parseFloat(document.getElementById("shul").value)>parseFloat(document.getElementById("bdsl").value)){
		          msg ="应单数量大于报单数量,请重新填写";
		          flag = false;
		        }
		        if(parseFloat(document.getElementById("shul").value)!=parseFloat(GetYueZJ())){
		          msg ="应单总数量和分月数量不等,请重新填写";
		          flag = false;
		        }
		        if(flag){
		        var url = "<%=path%>/gpjy/modifyYdxxInfo.action";
		         $("#form1").ajaxSubmit({
		              url:url,
		              type:'post',
		              success:function(data){
		              var json =eval('(' + data + ')');
					    if(json.result==1){
					    alert("应单成功！");
					    window.returnValue=1;
                        window.close();					   
					   }else{
					    alert("应单失败！");
					   }
		              }
		         });
		        }else{
		        alert(msg);
		        }
		        		       
		       
		        }
		       });
	     
	}
	
	function txtzjl_onblur() { 
	     if ($("#shul").val() != "") {
                var zjsl = parseFloat($("#shul").val());
                var yuesl = zjsl / 12;
                var intyue = parseInt(yuesl);
                var syysl = intyue * 11;
                var srysl = zjsl - syysl;
                SetYueZJ(intyue, srysl);
                return;
            }
            SetYueZJ(0, 0); 
	     
            
        }

        function SetYueZJ(yuesl, srysl) {
            if(yuesl==0){
            $("#shul").val(yuesl)
            }
            $("#jan").val(yuesl);
            $("#feb").val(yuesl);
            $("#mar").val(yuesl);
            $("#apr").val(yuesl);
            $("#may").val(yuesl);
            $("#jun").val(yuesl);
            $("#jul").val(yuesl);
            $("#aug").val(yuesl);
            $("#sep").val(yuesl);
            $("#oct").val(yuesl);
            $("#nov").val(yuesl);
            $("#dec").val(srysl);            
        }  
        
     function txtyuesl_onblur() {
            if (!event.srcElement.value) {
                event.srcElement.value = '0'
            }
            var temp = GetYueZJ();
            if (isNaN(temp)) {
                $("#shul").val(0);                
            }
            else {
                $("#shul").val(temp);                
            }

        }

        function GetYueZJ() { 
             var yue1 =parseFloat($("#jan").val()==''?0:$("#jan").val());            
            var yue2 = parseFloat($("#feb").val()==''?0:$("#feb").val());
            var yue3 = parseFloat($("#mar").val()==''?0:$("#mar").val());
            var yue4 = parseFloat($("#apr").val()==''?0:$("#apr").val());
            var yue5 = parseFloat($("#may").val()==''?0:$("#may").val());
            var yue6 = parseFloat($("#jun").val()==''?0:$("#jun").val());
            var yue7 = parseFloat($("#jul").val()==''?0:$("#jul").val());
            var yue8 = parseFloat($("#aug").val()==''?0:$("#aug").val());
            var yue9 = parseFloat($("#sep").val()==''?0:$("#sep").val());
            var yue10 = parseFloat($("#oct").val()==''?0:$("#oct").val());
            var yue11 = parseFloat($("#nov").val()==''?0:$("#nov").val());
            var yue12 = parseFloat($("#dec").val()==''?0:$("#dec").val()); 

            var yuezj = yue1 + yue2 + yue3 + yue4 + yue5 + yue6 + yue7 + yue8 + yue9 + yue10 + yue11 + yue12;
            return yuezj;
        }
     
     function jsdxxHide(){
     $("#jsdnr1").hide();
     $("#jsdnr").show();
        $.each($("#bjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#bjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#sjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        }); 
        $.each($("#sjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'none';    
          }   
        });   
     }  
     
     function jsdxxShow(){
     $("#jsdnr").hide();
     $("#jsdnr1").show();
     $.each($("#bjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       });
     $.each($("#sjsdnr tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       }); 
       $.each($("#bjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       });
     $.each($("#sjsdnr1 tr"), function(i){     
         if(i > 0){        
           this.style.display = 'block';    
         }   
       });
     } 
	
	function checkJg(){
	var jig = "${bdxx.danj}";
	//alert(jig);
	var jiglx ="${bdxx.jiaglxname}";
	var neir =$("#neir2").text();
	var str = "";
	if(jiglx!='' && jiglx!=null){
	    str+=jiglx+":";
	}
	if(jig!='' && jig!=null){
	    str+=jig+"元/吨,"	;
	}
	$("#neir2").text(str+neir);
	}
	</script>

</head>

<body>

	<div id="tab">
		<h1>挂 牌 报 单</h1>

		<form name="form1" id="form1">
			<table id="list_search" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td>出卖人（销方）:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.baodrdwmc}" readonly /> </td>
					<td>发货单位:</td>
					<td><input id="fahdwmc" name="fahdwmc" type="text"
						class="longtextbox1" value="${bdxx.sfahdwname}" /></td>
					<td><s:if test="bdxx.hetxs==1">
							<span id="mgz">出省站:</span>
						</s:if> <s:else>
							<span id="mgz">营业站:</span>
						</s:else></td>
					<td>
					<div class="select"><div>
            	    <select id="yingyz" name="yd.yingyzmeijglz" style="width:180px;"></select>            	
            	    </div></div>
                 </td>
				</tr>

				<tr>
					<td>买受人（购方）:</td>
					<td>
						<div class="select">
							<div>
								<select id="msrbm" name="yd.yingddw" style="width:180px;"
									onChange="changeTabForMsr(this.value)">

								</select>
							</div>
						</div>
						<input id="yingdbh" type="hidden" name="yd.yingdbh" value="${ydxx.yingdbh}" />
						
						<input type="hidden" id="yingdsj" name="yd.yingdsj" value="${ydxx.yingdsj}">
						<input type="hidden" id="sysid" name="yd.sysid" value="${ydxx.sysid}">
						</td>
					<td>报单时间:</td>
					<td><input id="datepicker" type="text" class="longtextbox1"
						value="${bdxx.baodsj}" readonly />
					</td>
					<td>到达省、地（市）:<span
						style="color: red;font-size:16px;vertical-align:middle;">*</span>
					</td>
					<td>
						<div class="select">
							<div title="请先选择合同形式">
								<select id="sheng" name="sheng" style="width:90px;"
									onChange="changeTabForShsxx(this.value,'shi')"></select>
							</div>
						</div>
						<div class="select">
							<div>
								<select id="shi" name="yd.daodssd" style="width:90px;"></select>
							</div>
						</div></td>
				</tr>

				<tr>
					<td>合同形式:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.hetxsname}" readonly /></td>
					<td>价格类型:</td>
					<td><input id="" type="text" class="longtextbox1"
						value="${bdxx.jiaglxname}" readonly /></td>
					<td>隶属行业:</td>
					<td><input type="text" class="longtextbox1"
						value="${bdxx.lisname}" readonly /></td>
				</tr>

				<tr>
					<td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、交（提）货时间、数量
					</td>
				</tr>
				<tr>
					<td colspan="6" style="padding:1px;">
						<table id="changdi" align="center" cellpadding="0" cellspacing="0"
							class="content_gridview">
							<thead>
								<tr>
									<th rowspan="3">收货人名称<span
										style="color: red;font-size:16px;vertical-align:middle;">*</span>
									</th>
									<th rowspan="3">品种规格</th>
									<th rowspan="3">质量指标</th>
									<th rowspan="3">价格<br>(元/吨)</th>
									<th colspan="13">交（提）货时间、煤量（吨）<span
										style="color: red;font-size:16px;vertical-align:middle;">*</span>
									</th>
								</tr>
								<tr>
									<th rowspan="2">全年合计<span
										style="color: red;font-size:16px;vertical-align:middle;">*</span><br>
										<a href="#" onClick="txtzjl_onblur();"
										style="text-decoration:none;cursor: hand"><img
											src="<%=path%>/images/pinf.gif" border=0 alt="平分"
											align="absmiddle" height="18" width="18"> </a>&nbsp;&nbsp;<a
										href="#" onClick="SetYueZJ(0,0);"
										style="border:0px;text-decoration:none;cursor: hand"><img
											src="<%=path%>/images/qinl.gif" border=0 alt="清零"
											align="absmiddle" height="18" width="18"> </a>
									</th>
									<th colspan="3">一季度</th>
									<th colspan="3">二季度</th>
									<th colspan="3">三季度</th>
									<th colspan="3">四季度</th>
								</tr>
								<tr>
									<th>1</th>
									<th>2</th>
									<th>3</th>
									<th>4</th>
									<th>5</th>
									<th>6</th>
									<th>7</th>
									<th>8</th>
									<th>9</th>
									<th>10</th>
									<th>11</th>
									<th>12</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td rowspan="2"><textarea id="shr" cols="15" rows="3"
											class="textarea">${ydxx.sfahdwname}</textarea> <input
										id="shrid" type="hidden" name="yd.sfahdw"
										value="${ydxx.sfahdw}" /></td>
									<td rowspan="2"><textarea cols="12" rows="3"
											class="textarea1" readonly>${bdxx.pinzgg}</textarea></td>
									<td rowspan="2"><textarea cols="30" rows="3"
											class="textarea1" readonly>${bdxx.zhilzb}</textarea></td>
									<td rowspan="2"><textarea cols="10" rows="3"
											class="textarea1" readonly>${bdxx.danj}</textarea>
									</td>
									<td><input id="bdsl" type="text" class="textboxs1"
										value="${bdxx.shengysl}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl1}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl2}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl3}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl4}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl5}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl6}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl7}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl8}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl9}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl10}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl11}" readonly>
									</td>
									<td><input type="text" class="shorttextbox1"
										value="${bdxx.yl12}" readonly>
									</td>
								</tr>
								<tr>
									<td><input id="shul" type="text" class="textboxs"
										name="yd.yingdsl"
										value="<fmt:formatNumber value="${ydxx.yingdsl}" pattern="###"/>">
									</td>
									<td><input id="jan" type="text" class="shorttextbox"
										name="yd.gml1" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml1}" pattern="###"/>">
									</td>
									<td><input id="feb" type="text" class="shorttextbox"
										name="yd.gml2" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml2}" pattern="###"/>">
									</td>
									<td><input id="mar" type="text" class="shorttextbox"
										name="yd.gml3" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml3}" pattern="###"/>">
									</td>
									<td><input id="apr" type="text" class="shorttextbox"
										name="yd.gml4" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml4}" pattern="###"/>">
									</td>
									<td><input id="may" type="text" class="shorttextbox"
										name="yd.gml5" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml5}" pattern="###"/>">
									</td>
									<td><input id="jun" type="text" class="shorttextbox"
										name="yd.gml6" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml6}" pattern="###"/>">
									</td>
									<td><input id="jul" type="text" class="shorttextbox"
										name="yd.gml7" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml7}" pattern="###"/>">
									</td>
									<td><input id="aug" type="text" class="shorttextbox"
										name="yd.gml8" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml8}" pattern="###"/>">
									</td>
									<td><input id="sep" type="text" class="shorttextbox"
										name="yd.gml9" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml9}" pattern="###"/>">
									</td>
									<td><input id="oct" type="text" class="shorttextbox"
										name="yd.gml10" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml10}" pattern="###"/>">
									</td>
									<td><input id="nov" type="text" class="shorttextbox"
										name="yd.gml11" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml11}" pattern="###"/>">
									</td>
									<td><input id="dec" type="text" class="shorttextbox"
										name="yd.gml12" onClick="txtyuesl_onblur();"
										onKeyUp="this.value=this.value.replace(/\D/g,'');"
										value="<fmt:formatNumber value="${ydxx.gml12}" pattern="###"/>">
									</td>

								</tr>

							</tbody>
						</table>
					</td>
				</tr>

				<tr style="line-height:26px;">
					<td colspan="6">
						<table id="djtk" cellpadding="0" cellspacing="0" border rules=rows
							frame=below class="content">

							<s:iterator value="djtk" status="i">
								<tr>
									<td>${tkh} ${biaot}</td>
									<td style="width:86%"><div id="neir${i.index}">${neir}</div>
									</td>
								</tr>
							</s:iterator>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="6">
						<table cellpadding="0" cellspacing="0" style="width:100%"
							class="content_gridview">
							<thead>
								<tr>
									<th colspan="2">出卖人(销方)</th>
									<th colspan="2">买受人（购方）</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										<table id="sjsdnr" cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>出卖人名称：</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.baodrdwmc}" readonly />
												</td>
											</tr>

											<tr>
												<td>住 所:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.zhus}" readonly />
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.faddbr}" readonly />
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.weitdlr}" readonly />
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.dianh}" readonly />
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.chuanz}" readonly />
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.youzbm}" readonly />
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.kaihyh}" readonly />
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.yinhzh}" readonly />
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.nasrdjh}" readonly />
												</td>
											</tr>

										</table>
									</td>
									<td><table id="sjsdnr1" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>出卖人结算单位名称：</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsdwmc}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>

											<tr>
												<td>住 所:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsdwzs}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsfddbr}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jswtdlr}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsdh}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jscz}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsyb}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jskhyh}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsyhzh}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><input type="text" class="longtextbox1"
													value="${bdxx.jsnsdjh}" readonly />
												</td>
												<td valign="top"><br>
												</td>
											</tr>

										</table>
									</td>
									<td><table id="bjsdnr" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>买受人名称：</td>
												<td><input name="qiymc" type="text" class="longtextbox"
													id="msr" value="${ydxx.maishrdwmc}" readonly="readonly" />
												</td>
											</tr>

											<tr>
												<td>住 所:</td>
												<td><input name="dwdz" type="text" class="longtextbox"
													id="zs" value="${ydxx.zhus}" readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><input name="dwfddbr" type="text"
													class="longtextbox" id="fddbr" value="${ydxx.faddbr}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><input name="dwwtdlr" type="text"
													class="longtextbox" id="wtdlr" value="${ydxx.weitdlr}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><input name="dwdh" type="text" class="longtextbox"
													id="dh" value="${ydxx.dianh}" readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><input name="dwcz" type="text" class="longtextbox"
													id="cz" value="${ydxx.chuanz}" readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><input name="dwyzbm" type="text"
													class="longtextbox" id="yb" value="${ydxx.youzbm}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><input name="dwkhyh" type="text"
													class="longtextbox" id="khyh" value="${ydxx.kaihyh}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><input name="dwzh" type="text" class="longtextbox"
													id="zh" value="${ydxx.yinhzh}" readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><input name="dwnsrdjh" type="text"
													class="longtextbox" id="djh" value="${ydxx.nasrdjh}"
													readonly="readonly" />
												</td>
											</tr>
											<input type="hidden" id="msrlx" name="yd.yinddwlx" value="3">
										</table>
									</td>
									<td><table id="bjsdnr1" cellpadding="0" cellspacing="0"
											border="0" class="content1">
											<tr>
												<td>买受人结算单位名称：<span
													style="color: red;font-size:16px;vertical-align:middle;">*</span>
												</td>
												<td>
													<div class="select">
														<div>
															<select style="width:180px;" id="maisdwjsrbm"
																name="yd.jsdw" style="width:180px;"
																onchange="changeTabForJsdw(this.value,'2')"></select>
														</div>
													</div>
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td><input name="text4" type="text" class="longtextbox"
													id="szs" value="${ydxx.jsdwzs}" readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="sfddbr" value="${ydxx.jsfddbr}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="swtdlr" value="${ydxx.jswtdlr}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="sdh" value="${ydxx.jsdh}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="scz" value="${ydxx.jscz}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="syb" value="${ydxx.jsyb}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="skhyh" value="${ydxx.jskhyh}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="szh" value="${ydxx.jsyhzh}"
													readonly="readonly" />
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td><input name="text222" type="text"
													class="longtextbox" id="sdjh" value="${ydxx.jsnsdjh}"
													readonly="readonly" />
												</td>
											</tr>

										</table>
									</td>
								</tr>
							</tbody>
						</table>
					</td>

				</tr>
				<tr>
					<td colspan="4"><font size="2" color="#FF0000"><br>
					</font>
					</td>
					<td colspan="2" align="right"><font size="2">有效期：<input
							id="kssj" type="text" class="textbox" value="${bdxx.kaissj}"
							readonly /> 至<input id="jssj" type="text" class="textbox"
							value="${bdxx.jiessj}" readonly /> </font>
					</td>

				</tr>
				<tr>
					<td colspan="6" align="center"><input type="button"
						id="jsdnr1" value="隐藏"> <input type="button" id="jsdnr"
						value="展开">&nbsp;&nbsp;&nbsp; <input id="but1"
						type="button" name="" value="确认" /> &nbsp;&nbsp;&nbsp;<input
						id="but3" type="button" name="" value="关闭"
						onClick="window.returnValue=1;window.close();" />
					</td>
				</tr>
			</table>
			<input type="hidden" name="yd.baodbh" value="${bdxx.baodbh}">
		</form>
	</div>

	<div id="dialog-confirm" title="是否确认提交？"></div>

</body>
</html>

